import React from "react";
import {
  NavLink,
} from "react-router-dom";
import "./App.css";
import {useRoutes} from 'react-router-dom';

//路由数组
import routesArr from "./routes/routes2";

export default function App() {
  //创建路由的对象
  let routes = useRoutes(routesArr);
  //返回虚拟 DOM 对象
  return <div className="qq-container container">
      {/* 顶部一级导航 */}
      <header>
        <NavLink to="/home">音乐馆</NavLink>
        <NavLink to="/mine">我的音乐</NavLink>
      </header>

      {routes}
  </div>
}
